.so ../bk-macros
.TH "bk send" "\*[BKVER]" %E% "\*(BC" "\*(UM"
.\"    =============== Sending BitKeeper patches ===============
.SH NAME
bk send \- send a \*(BK patch
.SH SYNOPSIS
.B bk send
.[B] \-dfq
.[OPTreq] \-w wr
.[OPTreq] \-r revs
.[OPTreq] \-s subject
.[OPTreq] \-u URL
.ARG u@h.ca "| \-"
.SH DESCRIPTION
.LP
The
.B bk send
interface may be used to send changes through electronic mail.
In general, the
.B bk push
and
.B bk pull
interfaces are the easiest 
way to keep two repositories synchronized, but
.B bk send
requires only an email transport.
.LP
To send the whole repository, do:
.DS
$ bk send user@host.com
.DE
.LP
\*(BK will generate the (huge) patch and mail it to user@host.com.
.LP
If you happen to know that you want to send changes that occurred
after a specific changeset (and you know that the other repository
has that changeset), you can do this:
.DS
$ bk send -rbeta.. -s'Changes since beta' user@host.com
.DE
.LP
or
.sp
.DS
$ bk send -r1.10.. user@host.com
.DE
.LP
Send remembers the changesets it has sent in
.BI BitKeeper/log/send\- address
where 
.I address
is like user@host.com.  When you don't specify a list
of changesets to send, "send" will look in the log file and send only the
new changesets.  So the easiest thing to do is to always use the same
email address and just say:
.DS
$ bk send user@host.com
.DE
.LP
If you lose the log file and you want to seed it with the changes you
know have been sent, the command to do that is:
.DS
$ cd BitKeeper/log
$ bk changes \-r\<revs\> \-nd:KEY: \> send\-user@host.com
.DE
.LP
An alternative to the log file approach, which may only be used if you
have connectivity to the remote repository, is to talk to the remote 
repository to find out what needs to be sent.  The following will send
all the changes you have that the remote does not have:
.DS
$ bk send -ubk://thunk.org:5000 tytso@mit.edu
.DE
.LP
You may wrap patches so that they do not get corrupted by mailers.
We currently support wrapping with uuencode.  The following (contrived)
command sends a wrapped patch and applies it in
.B /tmp/foo
(which must
exist):
.DS
$ bk send \-wuu \-r..1.5 - | bk receive /tmp/foo
.DE
.SH OPTIONS
.TP \-s\*<subject\*>
.B \-d
Prepend the patch with unified diffs.  This is because some
people like looking at the diffs to decide if
they want the patch or not.
.tp
.B \-f
send the patch even if \*(BK believes the remote repository is up to date.
.tp
.B \-q
Be quiet.
.tp
.OPTreq \-r revs
Specify the list of changesets to send.
.tp
.OPTreq \-s subject
Specify a subject line for the patch email.
Without
.QR \-s ,
the default subject line
\*(lqBitKeeper patch\*(rq is used.
.tp
.OPTreq \-u URL
Instead of consulting the send log, connect to the remote repository 
specified by the URL, figure out what needs to be sent, and send it
to the specified email address.
.tp
.OPTreq \-w wr
Wrap the patch with 
.ARG WR
before sending it.
The current set of wrappers are:
.RS
.TP \fBgzip_b64\fPn
.B b64
base-64 encoding
.tp
.B gzip_b64
gzip and base-64 encoding
.tp
.B gzip_uu
gzip and uuencode
.tp
.B uu
uuencode
.RE
.SH "SEE ALSO"
.SA range
.SA receive
.SA wrap
.SH CATEGORY
.B File
